package com.swgk.core.base.aroute;

import android.app.Activity;
import android.content.Context;
import android.os.Bundle;

import com.alibaba.android.arouter.facade.annotation.Route;
import com.alibaba.android.arouter.launcher.ARouter;
import com.swgk.core.base.model.entity.VideoBean;

import java.io.Serializable;
import java.util.List;

/**
 * Time:2021/7/8
 * AUTHOR:F_Q
 * Description:阿里ARouter开源组件跳转处理
 */
public class ARouterStartWebBase  {
    private static String tag = "ARouterStartWebBase";

    //H5详情页
    public static void start(Context mContext, String url) {
        ARouter.getInstance().build(AppRouteConstant.WEB_ROUTE_URL).withString("webUrl",url).withBoolean("isARouter",true).navigation();
    }
    public static void start(Activity mContext, String url, int requestCode) {
        ARouter.getInstance().build(AppRouteConstant.WEB_ROUTE_URL).withString("webUrl",url).withBoolean("isARouter",true).navigation(mContext,requestCode);
    }
    public static void start(String url,String id) {
        ARouter.getInstance().build(AppRouteConstant.WEB_ROUTE_URL).withString("webUrl",url).withString("id",id).withBoolean("isARouter",true).navigation();
    }
    public static void start(String url,String id,String type) {
        ARouter.getInstance().build(AppRouteConstant.WEB_ROUTE_URL).withString("webUrl",url).withString("id",id).withString("types",type).withBoolean("isARouter",true).navigation();
    }
    public static void start(Activity mContext,String url,String id,String type, int requestCode) {
        ARouter.getInstance().build(AppRouteConstant.WEB_ROUTE_URL).withString("webUrl",url).withString("id",id).withString("types",type).withBoolean("isARouter",true).navigation(mContext,requestCode);
    }
    //企业网站
    public static void startWebSiteInfo(String no, int type) {
        ARouter.getInstance().build(AppRouteConstant.WEBSITEINFO_URL).withString("No",no).withInt("Type",type).withBoolean("isARouter",true).navigation();
    }
    //企业店铺
    public static void startShopInfo(Context mContext, String id, String companyNo, int position, int childPosition) {
        ARouter.getInstance().build(AppRouteConstant.WEB_SHOPINFO).withString("id",id).withString("companyNo",companyNo).withInt("position",position).withInt("childPosition",childPosition).withBoolean("isARouter",true).navigation();
    }
    //地址
    public static void startWebSiteAddress(Activity mContext, int position, int childPosition) {
        ARouter.getInstance().build(AppRouteConstant.WEBSITE_ADDRESS).withInt("types",position).withBoolean("isARouter",true).navigation(mContext,childPosition);
    }
    //分享
    public static void startHomeShareAct() {
        ARouter.getInstance().build(AppRouteConstant.HOMESHARE_ACTIVITY).navigation();
    }
    //发票
    public static void starInvoiceManagement(String no, int type) {
        ARouter.getInstance().build(AppRouteConstant.INVOICE_MANAGEMENT).withString("companyNo",no).withInt("Type",type).withBoolean("isARouter",true).navigation();
    }

    //视频播放
    public static void starPlaylist(String videotype, String records,int pos,int page) {
        //ARouter.getInstance().build(AppRouteConstant.PLAYLIST_ACTIVITY).withString("videotype",videotype).withSerializable("data", (Serializable) records).withInt("pso",pos).withInt("page",page).withBoolean("isARouter",true).navigation();
        ARouter.getInstance().build(AppRouteConstant.PLAYLIST_ACTIVITY).withString("videotype",videotype).withString("data", records).withInt("pso",pos).withInt("page",page).withBoolean("isARouter",true).navigation();
    }
}
